<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #app{
            width: 200px;
            height: 200px;
            background-color: pink;
        }
        .box1{
            width: 150px;
            height: 150px;
            background-color: skyblue;
        }
        .box2{
            width: 50px;
            height: 50px;
            background-color: yellow;
        }
    </style>
</head>
<body>
    <div id="app">
        我是app
        <div class="box1" @click='f1'>
            我是box1
            <div class="box2" @click.stop='f2("哈哈")'>
                我是box2
            </div>
        </div>
    </div>
</body>
<script src="./vue.js"></script>
<script>
    const vm =new Vue({
        el:'#app',
        methods:{
            f1(){
                console.log('f1')
            },
            f2(res){
                console.log(this)
                console.log(res)
            }
        }
    })
</script>
</html>